<!--
    Desenvolvido pela Fábrica de Software do CESUPA.
    Todos os direitos reservados.

    @author Breno Leite
-->

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:appcommons="http://www.fabsoft.cesupa.br/appcommons">

    <ui:composition template="/infrastructure/templates/general-template.xhtml">
        <ui:define name="additional-header-content">
            <link href="#{facesContext.externalContext.request.contextPath}/infrastructure/styles/structures/light-structure.css"
                  rel="stylesheet" type="text/css" media="screen" />
            <link href="#{facesContext.externalContext.request.contextPath}/infrastructure/styles/components/footer-comp-style.css"
                  rel="stylesheet" type="text/css" media="screen" />
            <link href="#{facesContext.externalContext.request.contextPath}/infrastructure/styles/tags/application-status-tag-style.css"
                  rel="stylesheet" type="text/css" media="screen" />
            <link href="#{facesContext.externalContext.request.contextPath}/infrastructure/styles/tags/field-message-tag-style.css"
                  rel="stylesheet" type="text/css" media="screen" />
            <link href="#{facesContext.externalContext.request.contextPath}/infrastructure/styles/tags/required-marker-tag-style.css"
                  rel="stylesheet" type="text/css" media="screen" />
        </ui:define>

        <ui:define name="onpageload">
            Nifty("div#current-status-message", "bl br small");
            Nifty("div#footer,div#topo-titulo,div#status", "small");
        </ui:define>

        <ui:define name="body">
            <div id="header">
                <ui:insert name="header">
                    <c:if test="#{initialpage == null || initialpage == false}">
                        <a href="#{facesContext.externalContext.request.contextPath}"
                           accesskey="h">
                            <img alt="#{altmessages.ApplicationLogo}" border="0"
                                 title="#{tooltipmessages.BackToMainPage}" id="logo"
                                 src="#{facesContext.externalContext.request.contextPath}/infrastructure/images/placeholder-logo.gif" />
                        </a>
                    </c:if>

                    <c:if test="#{initialpage == true}">
                        <img alt="#{altmessages.ApplicationLogo}" border="0"
                             title="#{altmessages.ApplicationLogo}" id="logo"
                             src="#{facesContext.externalContext.request.contextPath}/infrastructure/images/placeholder-logo.gif" />
                    </c:if>

                    <div id="topo-titulo">
                        <h1>
                            [Nome do sistema]
                        </h1>
                    </div>
                </ui:insert>
            </div>
            <br/>

            <div id="content">
                <br />

                <div style="clear:both;">
                    <appcommons:applicationStatus/>
                </div>

                <ui:insert name="content"></ui:insert>
            </div>

            <ui:include src="/infrastructure/templates/components/footer-comp.xhtml"/>
        </ui:define>
    </ui:composition>
</html>